ENG-1136: Notify user when suggestive mode suggestion is adopted (Roam)#1145
Open
trangdoan982 wants to merge 4 commits into
Open
ENG-1136: Notify user when suggestive mode suggestion is adopted (Roam)#1145trangdoan982 wants to merge 4 commits into
trangdoan982 wants to merge 4 commits into
Conversation
When a user adopts a suggestion in Suggestive Mode: - Shows a toast "Added to [[Page Name]]" if the target page is already open in the main window or if sidebar navigation is disabled - Opens the target page in the right sidebar (or brings it to the top if already open) otherwise - Shows a toast confirming the created relation when a reified relation is adopted instead of a block Adds a new `notifySuggestiveModeAdoption` utility to keep notification logic separate from `SuggestionsBody`. Co-authored-by: Cursor <cursoragent@cursor.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Only add notifySuggestiveModeAdopted at the end of the success path; don't restructure the existing if/else branches. Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace "adopted/adoption" naming with "added" throughout - Split single export with discriminated union into two direct functions: notifyBlockSuggestionAdded and notifyRelationSuggestionAdded - Inline one-off helpers: getSidebarWindows, findOutlineSidebarWindowId, resolveTargetPageUid - Merge bringSidebarWindowToTop + focusTopSidebarOutline into one focusSidebarOutline(windowId?, delayMs?), removing the buggy global fallback selector when a specific windowId is targeted - Share a single showSuggestionToast for both toast paths Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a user adopts a suggestion in Suggestive Mode (Roam), they now receive clear feedback about where the content was added:
disableSidebarOpensetting enabled → shows the same toast instead of opening the sidebarFor reified relation adoptions (when Stored Relations are enabled), a toast confirms the relation was created:
Added relation between [[Source]] and [[Destination]].Changes
apps/roam/src/utils/notifySuggestiveModeAdoption.ts(new) — encapsulates all notification logic; keepsSuggestionsBodyfocused on block creationapps/roam/src/components/SuggestionsBody.tsx— wiresnotifySuggestiveModeAdoptedintohandleCreateBlock; also fixes a pre-existing bug where the "Could not identify a relevant relation" toast was shown but execution continued instead of returning earlyTest plan
disableSidebarOpenenabled: adopt a suggestion → toast appears regardless of sidebar stateMade with Cursor